package com.awesome.designpatterndemo.proxy.proxy1;

/**
 * Author: zhangjingfang
 * Email:zhangjingfang@jeejio.com
 * Date: 2021/7/30 7:51 下午
 * Description:类描述
 */
public class ProxySubject extends Subject{
    // 持有真实主题的引用
    private RealSubject mSubject;

    public ProxySubject(RealSubject subject) {
        mSubject = subject;
    }

    @Override
    public void visit() {
        // 通过真实主题引用的对象调用真实主题中的逻辑方法
        mSubject.visit();
    }
}